package com.cloud.system.api.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import com.cloud.system.api.entity.SysDictItem;
import com.cloud.system.common.result.SelectItem;
import com.cloud.system.common.utils.BaseMapperHelper;

public interface SysDictItemMapper extends BaseMapperHelper<SysDictItem> {

	@Select("select dict_item_name as label, dict_item_value as value, senior_id as seniorId  from sys_dict_item where dict_key = #{dictKey} order by display_order")
	@Results({ @Result(property = "label", column = "label", javaType = String.class),
			@Result(property = "value", column = "value", javaType = Object.class),
			@Result(property = "seniorId", column = "seniorId", javaType = Object.class), })
	List<SelectItem> loadSelectItem( @Param("dictKey") String dictKey);

}
